home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Essentials / Technical.Notes / Mous / TN.MOUS.007 < prev   
Encoding:
Text File  |  1988-12-15  |  2.8 KB  |  81 lines  |  [TEXT/pdos]

  1. Apple II
  2. Technical Notes
  3. _____________________________________________________________________________
  4.                                                   Developer Technical Support
  5.  
  6.  
  7. Mouse
  8. #7:    Mouse Clamping
  9.  
  10. Revised by:    Matt Deatherage                                  November 1988
  11. Written by:    Rilla Reynolds                                    October 1986
  12.  
  13. This Technical Note describes the different methods available for obtaining 
  14. mouse clamping values on different Apple II family machines.
  15. _____________________________________________________________________________
  16.  
  17.  
  18. AppleMouse Card
  19.  
  20. The AppleMouse card delivers clamping values on request.  There is no specific 
  21. mouse routine to obtain the clamping values, but an internal routine may be 
  22. used by the mouse card to return them.  The values are returned as minimum and 
  23. maximum values of X and Y clamps, both low and high bytes.
  24.  
  25. Note:    The following code is the only supported use of the $Cn1A 
  26. offset into the mouse card firmware, and this entry point is not 
  27. available in any other mouse firmware implementation.  
  28.  
  29. GetClamp   LDA    #$4E
  30.            STA    $478            ;Needed by Mouse Card firmware
  31.            LDA    #$00
  32.            STA    $4F8            ;Needed by Mouse Card firmware
  33.            STA    Tmp             ;Zero-page word for indirect addressing
  34.            LDA    #CN             ;$C<slot>, obtained prior to this rtn
  35.            STA    Tmp+1           ;$C<slot>00, Mouse Card firmware main entry
  36.            STA    ToCard+2
  37.            LDY    #$1A
  38.            LDA    (Tmp),Y
  39.            STA    ToCard+1        ;Mouse Card firmware GetClamp entry
  40.            LDA    #7
  41.            STA    BytePtr
  42.            LDY    #N0             ;$<slot>0, for Mouse Card firmware
  43. GetByte    LDX    #CN             ;$C<slot>, for Mouse Card firmware       
  44.            LDA    #0              ;Needed by Mouse Card firmware
  45.            JSR    ToCard
  46.            LDA    $578            ;Clamp byte returned by Mouse Card firmware
  47.            LDX    BytePtr
  48.            STA    Byte,X
  49.            DEC    $478
  50.            DEX
  51.            STX    BytePtr 
  52.            BPL    GetByte
  53.            RTS
  54. ToCard     JMP    $0000           ;Operand modified by rtn
  55. Byte       DS    8,0              ;MinXH,MinYH,MinXL,MinYL,MaxXH,MaxYH,MaxXL,MaxYL
  56. BytePtr    DS    1,0
  57.  
  58.  
  59. Apple IIc
  60.  
  61. For the Apple IIc, you can get clamping values by reading the following 
  62. auxiliary memory screen holes:
  63.  
  64.     $47D MinXL        $67D MaxXL
  65.     $4FD MinYL        $6FD MaxYL
  66.     $57D MinXH        $67D MaxXH
  67.     $5FD MinYH        $6FD MaxYH
  68.     
  69.  
  70.  
  71. Apple IIGS
  72.  
  73. On the Apple IIGS, the Miscellaneous Tool Set call GetMouseClamp returns the 
  74. mouse clamp values as four words on the stack.  This call is documented in the 
  75. Apple IIGS Toolbox Reference, Volume 1.
  76.  
  77.  
  78. Further Reference
  79. o    Apple IIGS Toolbox Reference, Volume 1
  80.  
  81.